Skip to content

Add RestartExecutionsWithoutMessages to IFunctionStore#178

Merged
stidsborg merged 1 commit into
mainfrom
restart-executions-without-messages
Jun 27, 2026
Merged

Add RestartExecutionsWithoutMessages to IFunctionStore#178
stidsborg merged 1 commit into
mainfrom
restart-executions-without-messages

Conversation

@stidsborg

Copy link
Copy Markdown
Owner

Summary

Adds a lighter variant of RestartExecutionsRestartExecutionsWithoutMessages — that restarts flows and returns their effects without fetching messages. Useful for restart paths that don't need the message snapshot, avoiding the extra message query/round-trip.

Changes

  • New type StoredFlowWithEffects(StoredFlow, IReadOnlyList<StoredEffect>, IStorageSession)StoredFlowWithEffectsAndMessages minus the Messages field.
  • Interface IFunctionStore.RestartExecutionsWithoutMessages(IReadOnlyList<StoredId>, ReplicaId).
  • Implementations with identical restart/ownership semantics, only the messages step removed:
    • InMemory — drops the MessageStore.GetMessages call.
    • PostgreSQL — 2 parallel queries (restart + effects) instead of 3.
    • MariaDB / SqlServer — effects come back inline from RestartFlowsAsync, so just the restart call.
    • Both CrashableFunctionStore decorators (test + sample) delegate the new method.

All stores reuse the existing private helpers — no new SQL.

Tests

Four store-level tests added to StoreCrudTests (template + overrides for all four stores): restart multiple unowned flows, skip already-owned flows, empty input, and includes-existing-effects (which also confirms messages aren't fetched, since the return type has no Messages field).

All 16 new tests pass across InMemory, PostgreSQL, MariaDB and SqlServer. Build is clean (0 warnings, 0 errors).

Note: this is an additive API change — RestartExecutionsWithoutMessages can't be a return-type overload of RestartExecutions, hence the explicit name.

Adds a lighter variant of RestartExecutions that restarts flows and
returns their effects without fetching messages. Introduces the
StoredFlowWithEffects record and implements the method across the
in-memory, PostgreSQL, MariaDB and SqlServer stores (reusing the
existing restart/effects helpers), plus the CrashableFunctionStore
decorators. Covered by store-level tests in StoreCrudTests.
@stidsborg
stidsborg merged commit d61c3c0 into main Jun 27, 2026
8 checks passed
@stidsborg
stidsborg deleted the restart-executions-without-messages branch June 27, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant